import request from '@/utils/request'


// 查询字段列表---发票
export function getInvoiceList(type) {
    return request({
      url: '/field/bizCrmField/list/'+type,
      method: 'post',
    })
}

// 查询发票模块字段列表
export function getInvoiceListHead(type) {
    return request({
      url: '/field/bizCrmField/queryListHead/'+type,
      method: 'post',
    })
}

// 查询发票列表页数据
export function queryInvoicePageList(data) {
    return request({
      url: '/crm/crmInvoice/queryPageList',
      method: 'post',
      data: data
    })
  }

// 新增发票数据
export function addInvoice(data) {
  return request({
    url: '/crm/crmInvoice/add',
    method: 'post',
    data: data
  })
}

// 修改发票数据
export function updateInvoice(data) {
  return request({
    url: '/crm/crmInvoice/update',
    method: 'post',
    data: data
  })
}

// 根据ID查询信息 ---发票
export function queryById(data) {
  return request({
    url: '/crm/crmInvoice/queryById',
    method: 'post',
    data: data
  })
}

// 根据ID删除数据 --发票
export function deleteByIds(data) {
  return request({
    url: '/crm/crmInvoice/deleteByIds',
    method: 'post',
    data: data
  })
}

//查询详情页信息---发票
export function informationInvoice(customerId,data) {
  return request({
    url: '/crm/crmInvoice/information/'+customerId,
    method: 'post',
  })
}

//查询新增所需字段---发票
export function queryInvoiceField(id) {
  return request({
    url: '/crm/crmInvoice/field/'+id,
    method: 'post',
  })
}

//根据ID查询---发票
export function queryByIdInvoice(customerId) {
  return request({
    url: '/crm/crmInvoice/queryById/'+customerId,
    method: 'post',
  })
}

//基本信息保存修改---发票
export function updateInformationInvoice(data) {
  return request({
    url: '/crm/crmInvoice/updateInformation',
    method: 'post',
    data:data,
  })
}

//客户标星
export function starInvoice(contractId) {
  return request({
    url: '/crm/crmInvoice/star/'+contractId,
    method: 'post',
  })
}
